function set_chessboard( poly ) {
    var plane = poly;
    return function( pt ) {
	var dist = new coord(pt.x - plane.vertex.x,
			     pt.y - plane.vertex.y,
			     pt.z - plane.vertex.z);
	var xdist = vec_dotp(dist, plane.ax);
	var ydist = vec_dotp(dist, plane.ay);
	var result = new rgbcolor(0,0,0,1);
	if(xdist < 0 || ydist < 0) return null;
	var flag = true;
	if(Math.floor(xdist / 100) % 2 == 1) flag = !flag;
	if(Math.floor(ydist / 100) % 2 == 1) flag = !flag;
	if(flag) {
	    result.r = 255;
	    result.g = 255;
	    result.b = 255;
	}
	return result;
    }
}